package com.think.archive;

import com.alibaba.druid.sql.dialect.oracle.ast.expr.OracleSizeExpr;
import lombok.Data;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.MultipartConfigFactory;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.Bean;
import org.springframework.util.unit.DataSize;

import javax.servlet.MultipartConfigElement;

@SpringBootApplication
@EnableCaching
@MapperScan({"com.think.archive.mapper","com.think.archive.service.impl"})
public class ElectronicArchiveSystemApplication {

    public static void main(String[] args) {
        SpringApplication.run(ElectronicArchiveSystemApplication.class, args);
    }
//
//    @Bean
//    public MultipartConfigElement configElement() {
//        MultipartConfigFactory factory = new MultipartConfigFactory();
//        DataSize dataSize=DataSize.of(100, OracleSizeExpr.Unit.M);
//        factory.setMaxFileSize("10MB");
//        factory.setMaxRequestSize("2048MB");
//
//        return factory.createMultipartConfig();
//    }

}
